﻿using MCPlatform.Dxf.Utils;
using netDxf;
using netDxf.Entities;
using System;
using System.Linq;
using System.Text.RegularExpressions;
using System.Windows.Media;

namespace MCPlatform.Dxf.Entities
{
    public  class PathEntityBase 
    {
        [DisPlayProperty]
        public EntityObject? Type { get; set; } // 与之关联的DXF实体对象  


        public List<Vector3>? PointsList { get; set; }


        /// <summary>
        /// 起始坐标
        /// </summary>

        [DisPlayProperty]
        public Vector3 StartPoint { get; set; }

        //public double[]? StartPointArray
        //{
        //    get
        //    {             
        //        return Utility.Vector3ToDoubleArray(StartPoint);
        //    }
        //    set { }
        //}

        /// <summary>
        /// 中间坐标
        /// </summary>

        [DisPlayProperty]
        public Vector3? MidPoint { get; set; }


       


        //public double[]? MidPointArray
        //{
        //    get
        //    { 
        //        if (MidPoint == null) { return null; }
        //        return Utility.Vector3ToDoubleArray((Vector3)MidPoint); 
        //    }
        //    set { }
        //}


        /// <summary>
        /// 终点坐标
        /// </summary>
        [DisPlayProperty]
        public Vector3 EndPoint { get; set; }


        
        //public double[]? EndPointArray 
        //{
        //    get { return Utility.Vector3ToDoubleArray(EndPoint); }
        //    set { }
        //}


        /// <summary>
        /// 圆弧的中心点。
        /// </summary>
        [DisPlayProperty]
        public Vector3? Center { get; set; }


        /// <summary>  
        /// 椭圆的长轴长度。  
        /// </summary>  
        [DisPlayProperty]
        public double? MajorAxis { get;  set; }

        /// <summary>  
        /// 椭圆的短轴长度。  
        /// </summary>  
        [DisPlayProperty]
        public double? MinorAxis { get;  set; }

        [DisPlayProperty]
        public String? Handle { get; set; } //实体对应句柄，唯一标识

        [DisPlayProperty]
        public double? Length { get; set; } //实体长度
   
        public System.Windows.Shapes.Shape? Shape { get; set; }


        [DisPlayProperty]
        public bool IsPunchPoint { get; set; }

        [DisPlayProperty]
        public bool IsVisionPoint { get; set; }


        [DisPlayProperty]
        public bool IsCuttingPoint { get; set; }

    }
}
